package com.ruibang.glass.produce.feign;

import com.ruibang.glass.common.domain.file.FileInfo;
import com.teaming.cloud.framework2.common.model.ResultBody;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient("glass-file")
@Component
public interface FileApi {

    @GetMapping("/api/glass/file/getDetails/{businessId}")
    @ApiOperation(value = "根据businessId获取文件信息", notes = "根据businessId获取文件信息")
    ResultBody<FileInfo> getDetails(@PathVariable("businessId") String businessId);

    @PostMapping("/api/glass/file/getFileInfoByBusinessIds")
    @ApiOperation(value = "根据businessId批量获取获取文件信息", notes = "根据businessId批量获取获取文件信息")
    ResultBody<List<FileInfo>> getFileInfoByBusinessIds(@RequestBody List<String> businessIds);
}
